package com.lrs.java.j2se_self.thread;

public class TestYield {
	public static void main(String[] args){
		MyThread2 t1 = new MyThread2();
		Thread t2 = new Thread(t1);
		Thread t3 = new Thread(t1);
		t2.start();
		t3.start();
	}
}
class MyThread2 implements Runnable{
	MyThread2(){
	}
	public void run(){
		for(int i=0;i<100;i++){
			System.out.println("====thread " + i);
			if(i%10==0){
				Thread.yield();
			}
		}
	}
}